import java.awt.*;
import java.awt.event.*;

import javax.swing.*;
public class Screen extends JFrame implements KeyListener
{
  public Screen( String title ) 
	  
	 {
      super(title);
      addKeyListener((KeyListener)this);
      

      this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

      setUndecorated(true);
      Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
      setBounds(0,0,screenSize.width, screenSize.height);
      
  }
  

  public static void main( String[] args )
  {
	  Screen frame = new Screen("");
      frame.setVisible(true);
  }

	
	@Override
	public void keyPressed(KeyEvent e) {
		if(e.getKeyCode() == 27){
		  Screen.this.setVisible(false);
		  System.exit(0);
		}
	
		
	}
	
	
	@Override
	public void keyReleased(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}
	
	
	@Override
	public void keyTyped(KeyEvent e) {
		// TODO Auto-generated method stub
		
	}
}